#include <p18f4550.h>
#include <pic18f4550.h>

//Adapted from Shariar's Neopixel Tutorial on Signal Path Blog.
//

//#device ADC = 16

//the following mplab8 c18 compiler
/*
#FUSES NOWDT                    //No Watch Dog Timer
#FUSES WDT128                   //Watch Dog Timer uses 1:128 Postscale
#FUSES NOBROWNOUT               //No brownout reset
#FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOXINST                  //Extended set extension and Indexed Addressing mode disabled (Legacy mode)
*/
//The following mplab x xc8 complier
#pragma config WDT = OFF //watch dog timer off
#pragma config BOR = OFF //brown out
//low voltage programming is called something else here:
//here: file:///opt/microchip/xc8/v1.45/docs/chips/18f4550.html
#pragma config LVP = OFF //low voltage programming
#pragma config XINST = OFF //no extended instructs
#pragma config CPB = OFF
#pragma config CPD = OFF


// These parameters are also found in configuration bits of window - pic memory views
#pragma config PBADEN = OFF


//20MHz input
#pragma config PLLDIV = 5

//use external clock &  pll enabled
//EDIT: XT only good for up to 4MHz 
//Per this post: https://www.microchip.com/forums/m28108.aspx
//#pragma config FOSC = XT_XT
//Must use HS for 20MHz clock (max to 20MHz.)
#pragma config FOSC = HSPLL_HS //High Speed PLL, High Speed CLK
#pragma config CPUDIV = OSC1_PLL2

//c18 compiler. mplab 8
//#use delay(clock=48000000,crystal=20000000)

#define _XTAL_FREQ 48000000






